package com.xujicheng.designpattern.learn.factoryMethod;

import java.util.ArrayList;
import java.util.List;

/**
 * @project:design-pattern-learn
 * @package:com.xujicheng.designpattern.learn.factoryMethod
 * @author:xujicheng
 * @date:2018/8/7
 */
public abstract class Pizza {
    protected String name;
    protected String dough;
    protected String sause;
    protected List<String> toppings = new ArrayList<>();

    public void prepare(){
        System.out.println("Preparing "+name);
        System.out.println("Tossing dough");
        System.out.println("Adding sause");
        System.out.println("Adding toppings");
        for(int i = 0;i < toppings.size();i++){
           System.out.println("   "+toppings.get(i));
        }
    }

    public void bake(){
        System.out.println("Bake for 25 minutes at 350");
    }

    public void cut(){
        System.out.println("Cutting the pizza into diagonal slices");
    }

    public void box(){
        System.out.println("Place pizza in official PizzaStore box");
    }

    public String getName() {
        return name;
    }
}
